package com.weipai.springboot.module.mapper;

import com.weipai.springboot.model.GoodsOption;
import org.apache.ibatis.annotations.Update;

public interface GoodsOptionMapper {
    int deleteByPrimaryKey(String id);

    int insert(GoodsOption record);

    int insertSelective(GoodsOption record);

    GoodsOption selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(GoodsOption record);

    int updateByPrimaryKey(GoodsOption record);

    //根据属性选项值查出有多少个关联数据
    Integer getGoodsOptionByOptionId(String optionId);

    //根据商品id删除相关联的数据
    @Update("update c_goods_option set del_status=-1 where goods_id=#{id}")
    void updateDelStatusByGoodsId(String id);
}